Skip to content

Conversation

veod32
Copy link
Collaborator

@veod32 veod32 commented Feb 11, 2021

Add a new section in the Documentation guidelines related to documentation infrastructure with the description of adding a submodule into the documentation repository.

Closes #1763

docs/style
docs/examples
docs/examples
docs/doc_infrastructure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай выбирать какие-нибудь лаконичные адреса, типа infra или subprojects. И ещё, инфраструктурой часто называют другое: ВМ или контейнеры, приложения, сеть между ними.

#. Update the ``.gitmodules`` file by adding a new ``[submodule ...]`` section,
for example:

.. code-block:: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не баш, это ini

path = modules/metrics
url = https://github.com/tarantool/metrics.git
#. In the ``/modules`` directory, add the new submodule:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./modules, потому что мы считаем от корня проекта, а не от /.

The steps to do that is the following:

.. contents::
:local:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что значит :local:?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#table-of-contents

local : flag (empty)
Generate a local table of contents. Entries will only include subsections of the section in which the directive is given. If no explicit title is given, the table of contents will not be titled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Круто, не знал про такую штуку.


In case of the ``metrics`` submodule, the content source files are in the
``/doc/monitoring`` directory of the submodule repository. In the final
documentation view, the content should appear in the `Monitoring <https://www.tarantool.io/en/doc/latest/book/monitoring/>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это могла бы быть ссылка через :doc:


So, we need to:

* in ``/doc/book``of the documentation repository, create
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не хватает пробела после book


So, we need to:

* in ``/doc/book/cartridge``of the documentation repository, create
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be explained in a more straightforward way:

  • create a directory at ./doc/book/cartridge/cartridge_cli
  • copy ./modules/cartridge_cli/README.rst to ./doc/book/cartridge/cartridge_cli/index.rst.

We can take examples of the already existing submodules to show the logic of
the settings.

``metrics``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Очень круто, что ты разбираешь аж на двух примерах, как у нас всё устроено и почему именно так.


.. code-block:: bash
monitoring_root="${project_root}/modules/metrics/doc/monitoring" #
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

решетка в конце строки не нужна )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А вместо копирования кода можно было бы включить куски прямо из update_submodules.sh https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude

In this case, we need to add such a repository containing the source files
as a submodule to the `documentation repository <https://github.com/tarantool/doc>`_
and set up other necessary settings to ensure the proper building of the entire
body of Tarantool documentation presented at the `official web-site <http://www.tarantool.io/en/doc>`_.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше https, и можно дать ссылку без языка, чтобы нужный язык выбрался сам: https://www.tarantool.io/doc

@NickVolynkin NickVolynkin marked this pull request as draft February 12, 2021 08:43
veod32 and others added 2 commits February 12, 2021 20:52
…tion infrastructure with the description of adding a submodule into the documentation repository.

Closes #1763
@NickVolynkin NickVolynkin force-pushed the veod32/gh-1763-guidelines-add-subproject branch from fe57202 to ed4f016 Compare February 12, 2021 13:52
@NickVolynkin NickVolynkin marked this pull request as ready for review February 12, 2021 13:53
@NickVolynkin NickVolynkin self-requested a review February 12, 2021 13:53
@NickVolynkin NickVolynkin merged commit 6ff442f into latest Feb 12, 2021
@NickVolynkin NickVolynkin deleted the veod32/gh-1763-guidelines-add-subproject branch February 12, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[8pt] Describe "Adding a subproject in the docs"

3 participants